<script setup lang="ts">
  import sendMessage from "@/plugins/message.ts";
  const props = defineProps({
    message: {
      type: Object,
      default: () => ({}),
    },
  })
  function handleSendKnowledge(knowledge) {
    sendMessage(knowledge.knowledgeTitle, () => {})
  }
</script>

<template>
  <div class="title text-lg">{{ props.message.content }}</div>
  <van-divider class="my-0 border-[#000]" />
  <ul>
    <li
      class="my-1 text-[#48a3ff]"
      v-for="item in props.message.knowledgeList"
      :key="item.knowledgeId"
      @click="handleSendKnowledge(item)"
    >
      <span class="inlin-block cursor-pointer">{{ item.knowledgeTitle }}</span>
    </li>
  </ul>
</template>

<style scoped></style>
